package com.atguigu.springcloud.alibaba.service;

import com.atguigu.springcloud.alibaba.domain.TStorage;
import com.atguigu.springcloud.alibaba.dao.TStorageDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: shikong
 * @Date: 2020/8/13 16:48
 */

@Service
public class StorageService {

    @Resource
    private TStorageDao tStorageDao;

    public TStorage findAllStorage() {
        return tStorageDao.selectByPrimaryKey(1L);
    }


    public void storageUpdate(Long productId,Integer count){

        tStorageDao.updateBySeata(productId,count);
    }
}
